<template>
  <div class="xian">
     <ul>
       <li v-for='(item,key) in list'>
         {{item.name}}
       </li>
     </ul>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'xian',
  data() { 
    return {
      list:[] 
    }
  },
  methods: {

  },
  mounted() {
    let id=this.$route.query.id;
    console.log(this.$route.query.id);
     axios.get('https://elm.cangdu.org/shopping/restaurants?latitude=45.761089&longitude=126.631908').then((res)=>{
       var arr=res.data.filter((msg)=>{
         return msg.id==id
       })
       this.list=arr
     })
  },
 }
</script>

<style lang="scss" scoped>

</style>